self = top = window = global
delete global
delete Buffer

delete __dirname  //瑞数会检测当前执行的文件是哪一个  会对node环境做检测  这两个在浏览器环境中是没有的
delete __filename

/*
瑞数5代的加密入口被混淆过 可使用正则表达式定位  \S{4} = \S{4}\[\S{4}\[\d{2}\]\]\(\S{4}, \S{4}\) 或者 hook
*/
window.name = ''
window.localStorage = {
    "$_f1": "PHt1dCiS3eEhBqckP7g9XUOaZbW",
    "$_ff": "WGz4uT.fitsDKbeQBgLtpVoU5fpFv8VHC2XccLVivu8A2XTCKAzx90A1sTjUIEqw",
    "$_f0": "sB1sFPPWyI9xi8f8AfoOG.n_LMG",
    "$_fh1": "abJRX5qGt_GW5Q3sOLAzug9aM7Q",
    "__#classType": "localStorage",
    "$_nd": "3129838",
    "$_cDro": "Ja",
    "$_YWTU": "ddgB2.vofv0q1WkrWuQrwks6Ovb7zIsc8ezq6xZe1jV"
}
window.sessionStorage = {
    "$_cDro": "Ja",
    "$_YWTU": "ddgB2.vofv0q1WkrWuQrwks6Ovb7zIsc8ezq6xZe1jV"
}
window.XMLHttpRequest = function () {}
window.HTMLFormElement = function (){}
window.onbeforeunload = function (){}
window.webkitRequestFileSystem = function () {}
window.DOMParser = function (){}
window.clientInformation = navigator = {
    'appCodeName': "Mozilla",
    'appName': "Netscape",
    'appVersion': "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
    'bluetooth': {},
    'clipboard': {},
    'userAgent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36',
    'platform': "Win32",
    'connection': {},
    'mozConnection': {},
    'languages': ["zh-CN", "zh"],
    'webdriver': false,
    'getBattery': function () {},
    'webkitPersistentStorage': {}
}
location = {
    ancestorOrigins: {},
    host: "sugh.szu.edu.cn",
    hostname: "sugh.szu.edu.cn",
    href: "https://sugh.szu.edu.cn/",
    origin: "https://sugh.szu.edu.cn",
    pathname: "/",
    hash: "",
    protocol: "https:",
    search: "",
    port: "",
    toString: function () {
        return this.href;
    }
}
div = {
    getElementsByTagName: function (res) {
        if (res === 'i') {
            console.log("执行getElementsByTagName,元素:", res)
            return ''
        }
    }
}
meta = {
    0: {},
    1: {
        'content': 'metaContent',
        'parentNode': {
            removeChild: function () {
                console.log("执行parentNode中的removeChild")
            }
        }
    },
    length: 2,
}
window.addEventListener = function (res1, res2) {
    console.log("执行window中的addEventListener,元素:", res1, res2)
}
script = {
    0: {
        getAttribute: function (res) {
            console.log("执行getElementsByTagName中的getAttribute,元素:", res)
            if(res === 'r'){
                return "m"
            }
        },
        parentElement: {
            removeChild: function () {
                console.log("执行parentElement中的removeChild")
            }
        }
    },
    1: {
        getAttribute: function (res) {
            console.log("执行getElementsByTagName中的getAttribute,元素:", res)
            if(res === 'r'){
                return "m"
            }
        },
        parentElement: {
            removeChild: function (res) {
                console.log("执行parentElement中的removeChild")
            }
        }
    },
    length: 2,
}
document = {
    exitFullscreen: function () {},
    charset: "utf-8",
    characterSet: "utf-8",
    createElement: function (res) {
        if (res === 'div') {
            console.log("执行document中的createElement,元素:", res)
            return div
        }
    },
    getElementsByTagName: function (res) {
        console.log("执行document中的getElementsByTagName,元素:", res)
        if (res === 'meta') {
            return meta
        } else if (res === 'base') {
            return ''
        } else if (res === 'script') {
            return script
        }
    },
    getElementById: function (res) {
        console.log("执行document中的getElementById,元素:", res)
    },
    addEventListener: function (res1, res2) {
        console.log("执行document中的addEventListener,元素:", res1, res2)
    },
    attachEvent: function (res1, res2) {
        console.log("执行document中的attachEvent,元素:", res1, res2)
    },
    //documentElement是一个对象  mdn: Document.documentElement 返回 document 的根元素
    documentElement: {
        addEventListener: function (res1, res2) {
            console.log("执行document中的addEventListener,元素:", res1, res2)
        }
    }

}
setTimeout = function () {
};
setInterval = function () {
};

//外链js文件
'tsCode'
//自执行函数
'autoJsCode'

function getCookie() {
    return document.cookie;
}
